package cn.edu.scujcc.customofsichuan;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

public class exchange_account extends AppCompatActivity implements View.OnClickListener{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_exchange_account);
        Toolbar exchange_account = findViewById(R.id.toolbar_exchange_account);
        exchange_account.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });


        View currentUser = findViewById(R.id.exchange_account_user);
        View addUser = findViewById(R.id.exchange_account_add);

        currentUser.setOnClickListener(this);
        addUser.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.exchange_account_user:
                finish();
                break;
            case R.id.exchange_account_add:
                //跳转到登录界面，添加另一个账号
                Intent intent=new Intent(this,login.class);
                intent.setFlags(intent.FLAG_ACTIVITY_CLEAR_TASK|intent.FLAG_ACTIVITY_NEW_TASK);
                startActivity(intent);

                break;

        }
    }
}